package com.tuanzi.loan.business.service.family.impl;

import com.tuanzi.loan.business.entity.family.ProductManyHeadInfo;
import com.tuanzi.loan.business.repository.family.ProductManyHeadInfoRepository;
import com.tuanzi.loan.business.service.family.ProductManyHeadInfoService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.repository.JPAAuditRepository;
import com.tuanzi.loan.core.service.BaseAuditServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author caiwanlin
 * @create 2019-01-18 13:50
 */
@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class ProductManyHeadInfoServiceImpl extends BaseAuditServiceImpl<ProductManyHeadInfo,Long> implements ProductManyHeadInfoService {
    @Autowired
    private ProductManyHeadInfoRepository productManyHeadInfoRepository;
    @Override
    public ProductManyHeadInfo findByActivityId(Long activityId) {
        return productManyHeadInfoRepository.findByActivityId(activityId);
    }

    @Override
    protected JPAAuditRepository<ProductManyHeadInfo, Long> getRepository() {
        return productManyHeadInfoRepository;
    }
}
